<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 200px;
            height: 200px;
            background-color: red;
            position: relative;
        }
        .box2{
            width: 100px;
            height: 100px;
            background-color: blue;
            position: relative;
        }
        .box3{
            width: 50px;
            height: 50px;
            background-color: green;
        }
    </style>
</head>
<body>
    <div class="box1">
        <div class="box2">
            <div class="box3"></div>
        </div>
    </div>

    <script>
        let box1 = document.querySelector('.box1');
        let box2 = document.querySelector('.box2');
        let box3 = document.querySelector('.box3');

        box1.addEventListener('click', function(){
            console.log('box1 red');
        }, true)
        box2.addEventListener('click', function(){
            console.log('box2 blue');
        }, false)
        box3.addEventListener('click', function(){
            console.log('box3 green');
        }, false)

    </script>
</body>
</html>